<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="__STATIC__/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="__STATIC__/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="__STATIC__/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="__STATIC__/Admin/Flat/img/favicon.ico">
    	<script type="text/javascript" src="__STATIC__/uploadify/jquery-1.8.2.min.js"></script>
		<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
		<script src="__STATIC__/Admin/js/removeImg.js" type="text/javascript" charset="utf-8"></script>
		<link href="__STATIC__/uploadify/uploadify.css" type="text/css" rel="stylesheet"></link>
		<style type="text/css">
			#file{
				display: block;
			}
			
		</style>
	</head>
	<body>
		<div class="alert alert-success">添加品牌</div>
		<form action="" method="post">
			<div class="form-group">
				<label for="exampleInputEmail1">品牌名称</label>
				<input name="bname" id="exampleInputEmail1" class="form-control" type="text" autocomplete="off" placeholder="请输入分类名称" required="" >
			</div>
			
			<div class="form-group">
				<label for="">品牌LOGO</label>
				<input name="logo" id="logo" class="form-control" value="" type="hidden">
				<input id="file" type="file" multiple="false">
				<label for="">类型: *.jpg,*.png 大小: 2000KB</label>
	             <div id="uploadList">
	                <ul>
	                	
	                </ul>
	            </div>
			</div>
			
			
			<div class="form-group">
				<label for="">是否热门</label>
				<br />
				<label class="radio radio-inline" for="radio5">
				<input id="radio5" class="custom-radio" type="radio" data-toggle="radio" value="1"  name="is_hot">
				<span class="icons">
				<span class="icon-unchecked"> </span>
				<span class="icon-checked"> </span>
				</span>
				是
				</label>
				<label class="radio  radio-inline" for="radio6">
				<input id="radio6" class="custom-radio" type="radio" data-toggle="radio" value="0" checked name="is_hot">
				<span class="icons">
				<span class="icon-unchecked"> </span>
				<span class="icon-checked"> </span>
				</span>
				否
				</label>
			</div>
			<div class="form-group">
				<label for="exampleInputEmail2">排序</label>
				<input name="sort" value="100"  id="exampleInputEmail2" class="form-control" type="text"  required="" >
			</div>
			
			<button class="btn btn-primary btn-block" type="submit"> 添加 </button>
		</form>
		
		
	</body>
	
	
	<div lab="uploadFile">
	            
	            <script type="text/javascript">
	                $(function() {
	                    $('#file').uploadify({
	                        'formData'     : {//POST数据
	                            '<?php echo session_name();?>' : '<?php echo session_id();?>',
	                        },
	                        'fileTypeDesc' : '上传文件',//上传描述
	                        'fileTypeExts' : '{$set['filetype']}',
	                        'swf'      : '__STATIC__/uploadify/uploadify.swf',
	                        'uploader' : '{|U:"upload"}',
	                        'buttonText':'选择文件',
	                        'fileSizeLimit' : '2000KB',
	                        'uploadLimit' : 1,//上传文件数
	                        'width':65,
	                        'height':25,
	                        'successTimeout':10,//等待服务器响应时间
	                        'removeTimeout' : 0.2,//成功显示时间
	                        'onUploadSuccess' : function(file, data, response) {
	                            data=$.parseJSON(data);
	                            var imageUrl = data.image?data.url:'__STATIC__/image/default.png';
	                            $("#logo").val(data.path)
	                            var li="<img src='"+imageUrl+"' style='width:80px;height:50px;'/>";
	                            $("#uploadList ul").prepend(li);
	                            $('#file').slideUp();
	                        }
	                    });
	                });
	            </script>
	           
	        </div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
</html>
